using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using Leo.Entities;

namespace Leo.Repository.Mapping
{
    public class LaboratorioMap : EntityTypeConfiguration<Laboratorio>
    {
        public LaboratorioMap()
        {
            // Primary Key
            this.HasKey(t => t.id_laboratorio);

            // Properties
            this.Property(t => t.nombre_lab)
                .HasMaxLength(50);

            this.Property(t => t.comentario)
                .HasMaxLength(100);

            // Table & Column Mappings
            this.ToTable("Laboratorio");
            this.Property(t => t.id_laboratorio).HasColumnName("id_laboratorio");
            this.Property(t => t.nombre_lab).HasColumnName("nombre_lab");
            this.Property(t => t.comentario).HasColumnName("comentario");
        }
    }
}
